﻿@model IEnumerable<Traxz.Models.aspnet_Users>
@{
    ViewBag.Title = "AdminControlPanel";
}

<div id="AdminCP"><h2>Admin Control Panel</h2></div>
    <a href="@Url.Action("Create")"><img style="margin-top:10px" src="../../Content/img/CreateNewButton.png", alt="Edit" /></a>
<div id="controlPTableCont">
<table id="datatable">
<thead>
    <tr>
        <th>
            UserId
        </th>
        <th>
            UserName
        </th>
        <th>
            LoweredUserName
        </th>
        <th>
            MobileAlias
        </th>
        <th>
            IsAnonymous
        </th>
        <th>
            LastActivityDate
        </th>
        <th>
            Age
        </th>
        <th>
            Weight
        </th>
        <th>
            IsMale
        </th>
        <th>
            Controls
        </th>
        <th>
            Remove
        </th>
    </tr>
    </thead>
    <tbody>
@foreach (var item in Model)
{
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.UserId)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.UserName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.LoweredUserName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.MobileAlias)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.IsAnonymous)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.LastActivityDate)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Age)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Weight)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.IsMale)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id = item.UserId })
            @Html.ActionLink("Details", "Details", new { id = item.UserId })
        </td>
        <td>
            @Html.ActionLink("Delete", "Delete", new { id = item.UserId })
        </td>
    </tr>
}
</tbody>

</table>
</div>
<script type="text/javascript" >
    $(document).ready(function () {
        $('datatable').dataTable();
    });
</script>